package com.stockz.ui.swing.widget;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.Rectangle;

import com.stockz.ui.resource.image.ImageIconLoader;
import com.stockz.ui.swing.charting.util.SwingUtil;

public class JInternalFrame extends javax.swing.JInternalFrame {
	private static final long serialVersionUID = 8961255512000051043L;

	private static void init(JInternalFrame frame){
		frame.setFont(SwingUtil.mediumFont);
		frame.setFrameIcon(ImageIconLoader.loadImageIcon("icon.jpg"));
		frame.setLayout(new BorderLayout());
		frame.setDefaultCloseOperation(JInternalFrame.DISPOSE_ON_CLOSE);
		
		frame.setVisible(true);
		Rectangle maxBounds = SwingUtil.getScreenSize();
		frame.setSize(new Dimension(maxBounds.width,maxBounds.height - 20));
	}
	

	public JInternalFrame(String title) {
		super(title,true,true,true,true);
		init(this);
	}

	
	
}
